#ifndef _UNARYOP_H_
#define _UNARYOP_H_
#include "ast/exprType.h"
#include "ast/unaryopType.h"
#include "AstTypes.h"
class IVisitor;
class UnaryOp;
typedef QSharedPointer<UnaryOp> UnaryOpPtr;

class UnaryOp: public exprType
{
public:
    explicit UnaryOp(int op, const exprTypePtr& operand, int nodeId=-1);
    virtual ~UnaryOp();
    
    
    int op();
    void setOp(int op);
    
    exprTypePtr operand();
    void setOperand(const exprTypePtr& operand);
    
    
    virtual Ast::AstTypes type() const;
    virtual QString toString() const;
    virtual void accept(IVisitor* visitor, const SimpleNodePtr& node);
    virtual void traverse(IVisitor* visitor);
private:
    int _op;
    exprTypePtr _operand;
};




#endif